# Contributor: Eric Kidd <git@randomhacks.net>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=geos
pkgver=3.13.0
pkgrel=0
pkgdesc="GEOS is a library providing OpenGIS and JTS spatial operations in C++."
url="https://libgeos.org/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="cmake samurai"
subpackages="$pkgname-dev"
source="https://download.osgeo.org/geos/geos-$pkgver.tar.bz2
	10-bigendian.patch
	"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8ffaa3f49a8365db693ac948e9d66cf55321eb12151734c7da2775070b7804ffa607de2474b7019d6ea2a99d5e037fb1e8561bf9025e65ddd4bd1ba049382b28  geos-3.13.0.tar.bz2
007fbcd91ebbcfae5d5e9773a9c6fef701ec2686e981803ce72ea99115f5728e542983882c5298d13e8bb827a29bf05d02b447dfea9c586d3e308a19c93802ec  10-bigendian.patch
"
